<html>
<head>
<title>Docs For Class SimpleWhereClause</title>
<link rel="stylesheet" type="text/css" href="../media/style.css">
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
    <td class="header_top">flatfile</td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td class="header_menu">
  		  [ <a href="../classtrees_flatfile.html" class="menu">class tree: flatfile</a> ]
		  [ <a href="../elementindex_flatfile.html" class="menu">index: flatfile</a> ]
		  [ <a href="../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="200" class="menu">
      <b>Packages:</b><br />
              <a href="../li_flatfile.html">flatfile</a><br />
            <br /><br />
		<b>Tutorials/Manuals:</b><br />
					<strong>Package-level:</strong>
							<ul>
	<li type="square"><a href="../flatfile/tutorial_flatfile.pkg.html">Flatfile Tutorial</a>
</ul>

									                        <b>Files:</b><br />
      	  <div class="package">
			<a href="../flatfile/_flatfile_flatfile_php.html">		flatfile.php
		</a><br>
	  </div><br />
      
            <b>Classes:</b><br />
        <div class="package">
		    		<a href="../flatfile/AndWhereClause.html">AndWhereClause</a><br />
	    		<a href="../flatfile/CompositeWhereClause.html">CompositeWhereClause</a><br />
	    		<a href="../flatfile/Flatfile.html">Flatfile</a><br />
	    		<a href="../flatfile/LikeWhereClause.html">LikeWhereClause</a><br />
	    		<a href="../flatfile/ListWhereClause.html">ListWhereClause</a><br />
	    		<a href="../flatfile/NotWhere.html">NotWhere</a><br />
	    		<a href="../flatfile/OrderBy.html">OrderBy</a><br />
	    		<a href="../flatfile/OrWhereClause.html">OrWhereClause</a><br />
	    		<a href="../flatfile/SimpleWhereClause.html">SimpleWhereClause</a><br />
	    		<a href="../flatfile/WhereClause.html">WhereClause</a><br />
	  </div>
                </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<h1>Class: SimpleWhereClause</h1>
Source Location: /flatfile.php<br /><br />


<table width="100%" border="0">
<tr><td valign="top">

<h3><a href="#class_details">Class Overview</a></h3>
<pre><a href="../flatfile/WhereClause.html">WhereClause</a>
   |
   --SimpleWhereClause</pre><br />
<div class="description">Implements a single WHERE clause that does simple comparisons of a field  with a value.</div><br /><br />







</td>



<td valign="top">
<h3><a href="#class_methods">Methods</a></h3>
<ul>
    <li><a href="../flatfile/SimpleWhereClause.html#methodSimpleWhereClause">SimpleWhereClause</a></li>
    <li><a href="../flatfile/SimpleWhereClause.html#methodtestRow">testRow</a></li>
  </ul>
</td>

</tr></table>
<hr />

<table width="100%" border="0"><tr>





<td valign="top">
<h3>Inherited Methods</h3>
<div class="tags">
<h4>Class: <a href="../flatfile/WhereClause.html">WhereClause</a></h4>
<dl>
    <dt>
    <a href="../flatfile/WhereClause.html#methodtestRow">WhereClause::testRow()</a>
  </dt>
  <dd>
    Tests a table row object
  </dd>
  </dl>
</div>
</td>

</tr></table>
<hr />

<a name="class_details"></a>
<h3>Class Details</h3>
<div class="tags">
[line 399]<br />
Implements a single WHERE clause that does simple comparisons of a field  with a value.<br /><br /></div><br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div><br />


<hr />
<a name="class_methods"></a>
<h3>Class Methods</h3>
<div class="tags">
  <hr />
	<a name="methodSimpleWhereClause"></a>
	<h3>constructor SimpleWhereClause <span class="smalllinenumber">[line 437]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>SimpleWhereClause SimpleWhereClause(
int
$field, string
$operator, mixed
$value, [string
$compare_type = STRING_COMPARISON])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Creates a new <a href="../flatfile/WhereClause.html">WhereClause</a> object that does a comparison  of a field and a value.<br /><br /><p>This will be the most commonly used type of WHERE clause.  It can do comparisons  of the sort &quot;$tablerow[$field] operator $value&quot;  where 'operator' is one of:<br /> <ul><li>= (equals)</li><li>!= (not equals)</li><li>&gt; (greater than)</li><li>&lt; (less than)</li><li>&gt;= (greater than or equal to)</li><li>&lt;= (less than or equal to)</li></ul> There are 3 pre-defined constants (STRING_COMPARISON, NUMERIC COMPARISON and  INTEGER_COMPARISON) that modify the behaviour of these operators to do the comparison  as strings, floats and integers respectively.  Howevers, these constants are  just the names of functions that do the comparison (the first being the builtin  function <a href="http://www.php.net/strcmp">http://www.php.net/strcmp</a>, so you can supply your own function here to customise the  behaviour of this class.</p><br /><br /><br />


        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">int&nbsp;&nbsp;</td>
        <td><b>$field</b>&nbsp;&nbsp;</td>
        <td>The index (in the table row) of the field to test</td>
      </tr>
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$operator</b>&nbsp;&nbsp;</td>
        <td>The comparison operator, one of &quot;=&quot;, &quot;!=&quot;, &quot;&lt;&quot;, &quot;&gt;&quot;, &quot;&lt;=&quot;, &quot;&gt;=&quot;</td>
      </tr>
          <tr>
        <td class="type">mixed&nbsp;&nbsp;</td>
        <td><b>$value</b>&nbsp;&nbsp;</td>
        <td>The value to compare to.</td>
      </tr>
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$compare_type</b>&nbsp;&nbsp;</td>
        <td>The comparison method to use - either  STRING_COMPARISON (default), NUMERIC COMPARISON or INTEGER_COMPARISON</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodtestRow"></a>
	<h3>method testRow <span class="smalllinenumber">[line 445]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void testRow(
mixed
$tablerow)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />

Overrides <a href="../flatfile/WhereClause.html#methodtestRow">WhereClause::testRow()</a> (Tests a table row object)<br /><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
</div><br />


        <div class="credit">
		    <hr />
		    Documentation generated on Thu, 22 Dec 2005 12:59:51 +0000 by <a href="http://www.phpdoc.org">phpDocumentor 1.3.0RC3</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>